﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:helpers="clr-namespace:LogInModule.Views.Helpers"
	xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" 
	xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
	x:Class="LogInModule.Views.GameModeSelection">

    <Grid x:Name="LayoutRoot"
          Margin="350 100 0 0">

        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="60" />
            <RowDefinition Height="260" />
        </Grid.RowDefinitions>

        <TextBlock Grid.Row="0"
                   HorizontalAlignment="Center"
                   FontSize="50"
                   Foreground="White"
                   FontFamily="Segoe UI"
                   Text="Choose game mode"
                   Margin="10">
        </TextBlock>
        
        <TextBlock x:Name="selectedModeLabel"
                   Grid.Row="1"
                   HorizontalAlignment="Center"
                   FontSize="28"
                   Margin="10"
                   Foreground="White"
                   FontFamily="Segoe UI"
                   Text=""
                   Opacity="0.9">
        </TextBlock>

        <StackPanel Grid.Row="2"
                    Orientation="Horizontal"
                    VerticalAlignment="Center"
                    HorizontalAlignment="Center">
            <StackPanel.Resources>

                <Style TargetType="ContentControl"
                   x:Key="singlePlayerControl">
                    <Setter Property="Margin"
                        Value="10" />
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate>
                                <Grid>
                                    <Image Source="../images/single.png" Stretch="Uniform" Height="180"/>
                                </Grid>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>

                <Style TargetType="ContentControl"
                   x:Key="multiPlayerControl">
                    <Setter Property="Margin"
                        Value="10" />
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate>
                                <Grid>
                                    <Image Source="../images/multi.png" Stretch="Uniform" Height="180"/>
                                </Grid>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>

            </StackPanel.Resources>

            <Grid x:Name="frontSingle">
                <ContentControl Style="{StaticResource singlePlayerControl}"
                                Cursor="Hand"
                                MouseLeftButtonDown="singlePlayerButton_Click"
                                MouseEnter="singlePlayerButton_MouseEnter"
                                MouseLeave="singlePlayerButton_MouseLeave">
                </ContentControl>
            </Grid>

            <Grid x:Name="frontMulti">
                <ContentControl Style="{StaticResource multiPlayerControl}"
                                Cursor="Hand"
                                MouseLeftButtonDown="multiPlayerButton_Click"
                                MouseEnter="multiPlayerButton_MouseEnter"
                                MouseLeave="multiPlayerButton_MouseLeave">
              	</ContentControl>
            </Grid>

        </StackPanel>
    </Grid>
</UserControl>